Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

title_format plot option now includes dimensions #436

Merged
merged 9 commits into from Feb 3, 2016
Merged

Conversation

philippjfr
Copy link
Member

As the title says this allows more customizing the plot title_format as suggested in #425.

@philippjfr philippjfr added this to the v1.4.2 milestone Feb 2, 2016
@philippjfr philippjfr self-assigned this Feb 2, 2016
@philippjfr
Copy link
Member Author

The title_format plot option now allows enabling or disabling dimensions in the title. The only way I was able to do so without losing flexibility was to let the title accept a separator variable: "{label} {group}{separator}{dimensions}". Since bokeh doesn't support newline characters I'm tempted to remove this again and simply set different default title_format, for matplotlib I'd have "{label} {group}\n{dimensions}" and for bokeh I'd have "{label} {group} - {dimensions}".

@@ -916,7 +916,7 @@ def _compute_gridspec(self, layout):

# Create title handle
if self.show_title and len(self.coords) > 1:
title = self.handles['fig'].suptitle('', **self._fontsize('title'))
title = self.handles['fig'].suptitle('', y=1.05, **self._fontsize('title'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a magic number? I assume this makes it look better.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, generally avoids overlap between the plot title and the overall layout title. Not sure how best to provide control over it.

@philippjfr
Copy link
Member Author

Looks good for merging, the display changes are the deletion of trailing whitespace in the titles when no label is supplied.

@jlstevens
Copy link
Contributor

Ok. Tests are passing. Merging.

jlstevens added a commit that referenced this pull request Feb 3, 2016
The title_format plot option now includes dimensions
@jlstevens jlstevens merged commit 4e3e0bf into master Feb 3, 2016
@jlstevens jlstevens deleted the dim_title branch February 4, 2016 16:07
@jlstevens jlstevens restored the dim_title branch February 4, 2016 16:07
@jlstevens jlstevens deleted the dim_title branch February 4, 2016 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants